var JSONxEdit_jsonTree_toolbar_addMenu = [
	{
		text: 'Add Key',
		handler: addKeyToTree
	},
	'-',
	{
		text: 'Add Object',
		handler: addObjectToTree
	},{
		text: 'Add Array',
		handler: addArrayToTree
	}
];

var JSONxEdit_jsonTree_toolbar = new Ext.Toolbar({
	items:[{
		iconCls: "icon_tree_addKey",
		scale: 'small',
		id: 'icon_tree_addKey',
		menu: JSONxEdit_jsonTree_toolbar_addMenu
	},{
		iconCls: "icon_tree_delete",
		scale: 'small',
		id: 'icon_tree_delete',
		handler: function () {
			var selectionModel = JSONxEdit_jsonTree.getSelectionModel();
			var selectedNode = selectionModel.getSelectedNode();

			if ( selectedNode != null )
			{
				if ( selectedNode.attributes.id != "json_tree_root_node" )
				{
					selectedNode.remove();
					disableEditor();
				}
			}
		}
	}]
});